Skip to content

Conversation

baitcode
Copy link

@baitcode baitcode commented Aug 14, 2025

Usage related changes

This PR allows users who utilize devnet programmatically (as a 3rd party crate) to provide their own implementation of defaulters. Thus allowing for example using Pathfinders sqlite state reader dramatically improving speed of operation.

Closes #828

PLEASE HELP:

  • point me towards the doc I need to update.
  • point me towards the file to add custom defaulter tests to.

Development related changes

Nothing really

Checklist:

  • Checked out the contribution guidelines
  • Applied formatting - ./scripts/format.sh
  • No linter errors - ./scripts/clippy_check.sh -> ethers-providers cause tons of errors
  • No unused dependencies - ./scripts/check_unused_deps.sh
  • No spelling errors - ./scripts/check_spelling.sh -> incorrect test case latests cause trouble
  • Performed code self-review
  • Rebased to the latest commit of the target branch (or merged it into my branch)
    • Once you make the PR reviewable, please avoid force-pushing
  • Updated the docs if needed - ./website/README.md
  • Linked the issues resolvable by this PR - linking info
  • Updated the tests if needed; all passing - execution info

Copy link

coderabbitai bot commented Aug 14, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@baitcode baitcode changed the title Deafauter extension feature Defauter extension feature Aug 14, 2025
@baitcode baitcode marked this pull request as ready for review August 14, 2025 16:10
@FabijanC
Copy link
Contributor

Hi! The link you provide in PR description:
https://github.com/astraly-labs/starkbiter/pull/8/files#diff-530b20104135d4024ff43bea44fc93408da2eac8139dec631799c5042c1b072d
refers to a PR that has not yet been merged. What are you trying to say?

@baitcode
Copy link
Author

baitcode commented Aug 21, 2025

The PR I've linked is dependent on a forked devnet that has feature from this PR implemented (it will be merged soon). It also shows the implementation of a custom defaulter that uses sqllite pathfinder snapshot. Overall idea is to show you exact usecase for this feature. This PR is the first one that I need to push upstream to get rid of my devnet fork.

Copy link
Contributor

@FabijanC FabijanC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you imagine this as configurable via CLI?

As for the docs that need updating, please consider website/docs/forking.md.
Regarding the tests, you may consult tests/integration/test_fork.rs as an example, but since that file is already relatively big, you can consider adding a new testing file, similar to that one, but called e.g. test_fork_with_custom_defaulter.rs

@FabijanC FabijanC changed the title Defauter extension feature Defaulter extension feature Aug 22, 2025
@baitcode
Copy link
Author

@FabijanC
I tried to contemplate how this can be used as cli tool, but could not, really.

I intentionally moved extension implementation from devnet to avoid bloating the depedencies and minimising changeset.

It could be done though by adding sqlite (for example) implementation to the repo under the feature flag with static block that will register the extension, then everything should work out of the box using fork config url (I utilise url schema in to pick the right extension).

But tbh my sqlite pathfinder snapshot usage is highly opinionated and might not work for everyone. Sqlite is also picked out of the simplicity, schema could be optimised to improve snapshot size. I would not want that bit to be provided as a "good default". Anyways that definitely should be added to devnet as a separate feature.

Thank you for the directions. I'll provide tests and docs in the beginning of September.

@FabijanC
Copy link
Contributor

FabijanC commented Aug 25, 2025

Ok, so it seems this doesn't change the CLI or the web-API for the user in any way (EDIT: ok, that's basically what you've written). I would normally describe this as a development-related change because CLI is the expected environment for using Devnet.

I will change the PR description to mark your issue as closeable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow for customising defaulters
2 participants